<template>
	<div class="order-mian">
		<recorDetail ref="detail" @backList="backList" v-if="detail"></recorDetail>
		<recordContent v-show="!detail" @showdetail="showDetail"></recordContent>
	</div>
</template>

<script>
import recordContent from './content.vue';
import recorDetail from './detail.vue';
export default {
	data() {
		return {
			detail: false
		};
	},
	components: {
		recordContent,
		recorDetail
	},
	methods: {
		showDetail(params) {
			this.detail = true;
			this.$nextTick(() => {
				this.$refs['detail'].detailRefresh(params);
			});
		},
		backList() {
			this.detail = false;
		}
	}
};
</script>

<style lang="stylus" scoped>
.order-mian {
	height calc(100vh - 60px )
}
</style>
